{extend name="main"}
{block name="style"}
{css href="__TEMPLATE_STATIC__/user.css"}
{/block}
{block name="header"}
{include file="module/user_top_nav"/}
{/block}
{block name="body"}
<div class="flex1 flex h-100">
	<div class="w-180px bg-dark p-4 overflow-y-auto">
	{include file="module/user/company_left" left="module/user/company_left_jobs"/}
	</div>
	<div class="frame-body flex-1 overflow-y-auto py-3">
		<div class="container-xl bg-white shadow pb-3">
			<div class="flex mb-3">
				<div class="flex-1 block-title-before py-2">招聘效果统计</div>
			</div>
			<el-tabs v-model="activeName">
				<el-tab-pane label="发布中的职位" name="publishing"></el-tab-pane>
				<el-tab-pane label="未显示的职位" name="none"></el-tab-pane>
				<el-tab-pane label="全部职位" name="all"></el-tab-pane>
			</el-tabs>
			<div class="bg-1E54E5 p-3 mt-3 flex">
				<el-dropdown trigger="click" class="mr-4">
			      <span class="el-dropdown-link el-link">
			        全部来源<i class="el-icon-caret-bottom el-icon--right"></i>
			      </span>
			      <el-dropdown-menu slot="dropdown">
			        <el-dropdown-item>访客统计</el-dropdown-item>
			        <el-dropdown-item>职位浏览</el-dropdown-item>
			        <el-dropdown-item>应聘统计</el-dropdown-item>
			      </el-dropdown-menu>
			    </el-dropdown>
				<el-dropdown trigger="click">
			      <span class="el-dropdown-link el-link">
			        最近7天<i class="el-icon-caret-bottom el-icon--right"></i>
			      </span>
			      <el-dropdown-menu slot="dropdown">
			        <el-dropdown-item>最近7天</el-dropdown-item>
			        <el-dropdown-item>最近15天</el-dropdown-item>
			        <el-dropdown-item>最近30天</el-dropdown-item>
			      </el-dropdown-menu>
			    </el-dropdown>
			    <div class="flex-1"></div>
			    <div>
			    	<el-link type="primary" :underline="false">查看详情<i class="el-icon-arrow-right"></i></el-link>
			    </div>
			</div>
			<div class="bg-secondary p-5 mb-5"></div>
			<div class="flex mb-3 flex-center">
				<div class="block-title-before py-2">用户详细数据</div>
				<div class="text-secondary pl-3">登录<span class="text-primary">0</span>人，未登录<span class="text-primary">7</span>人(列表内只显示登录用户)</div>
			</div>
			<div class="py-3">
				<el-button type="primary" size="mini" round>获得记录</el-button>
				<el-button type="info" size="mini" round>消耗记录</el-button>
			</div>
			<div class="table-responsive">
				<el-table
					ref="multipleTable"
			      	:data="tableData"
		    		stripe
		    		v-loading="search.ajax"
		    		style="width: 100%;"
		    		header-cell-class-name="bg-1E54E5 text-666666">
			      <el-table-column
			        prop="create_time"
			        label="时间"
			        width="180">
			      </el-table-column>
			      <el-table-column
			        prop="salary"
			        label="积分"
			        width="120">
			      </el-table-column>
			      <el-table-column
			        prop="title"
			        label="来源"
			        show-overflow-tooltip>
			      </el-table-column>
			    </el-table>
			</div>
			<div class="table-responsive py-3 text-center">
				<el-pagination
				  background
				  :hide-on-single-page="true"
				  @current-change="getServerMessage"
			      :current-page="search.page"
			      :page-size="15"
			      layout="total,  prev, pager, next, jumper"
			      :total="search.total">
			    </el-pagination>
			</div>
		</div>
	</div>
</div>
{/block}
{block name="footer"}
{include file="module/login"/}
{/block}
{block name="script"}
<script type="text/javascript">
	var vm=new Vue({
		el:'#app',
		data:{
			view:XYBase.view,
			userInfo:UserInfo,
			loginTabs:XYBase.loginTabs,
			feedback:XYBase.feedback,
			search:{
		    	ajax:false,
				total:100,
				page: 1
			},
			activeName:'publishing',
			tableData:[{title:'消息标题',company_name:'深圳市五合嘉顿西餐厅',status:1,area:'深圳市/福田区',salary:'6-8K/月',create_time:'2020-5-18 15:48:12'},{title:'消息标题消息标题消息标题消息标题消息标题消息标题消息标题消息标题消息标题消息标题消息标题消息标题',company_name:'深圳市五合嘉顿西餐厅',area:'深圳市/福田区',salary:'6-8K/月',status:0,create_time:'2020-5-18 15:48:13'}]
		},
		watch:{
		    view:XYBase.viewWatch,
		    loginTabs:XYBase.loginTabsWatch,
			userInfo:{
				handler(val,oldVal){
					if (!val.id) {
						window.location.reload();
					}
				},
				deep:true
			},
		},
		created(){
			XYBase.created(this);
		},
		methods:XYBase.methods({
			toggleSelection(rows) {
				if (rows) {
				  rows.forEach(row => {
				    this.$refs.multipleTable.toggleRowSelection(row);
				  });
				} else {
				  this.$refs.multipleTable.clearSelection();
				}
			},
			handleSelectionChange(val) {
				this.multipleSelection = val;
			},
			filterHandler(value, row, column){
				console.log(value);
		        const property = column['property'];
		        return row[property] === value;
			},
			getServerMessage(val){
			},
			showMessage(data){},
			deleteMessage(index,data){}
		})
	});
</script>
{/block}